Skip to content

Conversation

anematode
Copy link
Contributor

The docs conflate __funcref with an actual type in a couple places.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jan 24, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 24, 2025

@llvm/pr-subscribers-backend-webassembly

@llvm/pr-subscribers-clang

Author: Timothy Herchen (anematode)

Changes

The docs conflate __funcref with an actual type in a couple places.


Full diff: https://github.com/llvm/llvm-project/pull/124365.diff

1 Files Affected:

  • (modified) clang/docs/LanguageExtensions.rst (+3-3)
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index c42b88015e2695..ddb11cc6efb232 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -2632,7 +2632,7 @@ with the current table size.
 .. code-block:: c++
 
   typedef void (*__funcref funcref_t)();
-  static __funcref table[0];
+  static funcref_t table[0];
 
   size_t getSize() {
     return __builtin_wasm_table_size(table);
@@ -2654,10 +2654,10 @@ or -1. It will return -1 if not enough space could be allocated.
 .. code-block:: c++
 
   typedef void (*__funcref funcref_t)();
-  static __funcref table[0];
+  static funcref_t table[0];
 
   // grow returns the new table size or -1 on error.
-  int grow(__funcref fn, int delta) {
+  int grow(funcref_t fn, int delta) {
     int prevSize = __builtin_wasm_table_grow(table, fn, delta);
     if (prevSize == -1)
       return -1;

@@ -1211,6 +1211,15 @@ WebAssemblyTargetLowering::LowerCall(CallLoweringInfo &CLI,
}
}
}

// If outgoing arguments are passed via the stack, we cannot tail call
for (const ISD::OutputArg &Out : CLI.Outs) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a completely unrelated change. Can it be split out into a separate PR (preferably with a test?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, i just got one item deeper into my queue and discovered #124443, thanks :)
Please just delete this change from the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! 😅

Copy link
Member

@dschuff dschuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need me to commit?

@anematode
Copy link
Contributor Author

Pardon? (Last time I made a PR my commit was merged directly, but I don't mind if you commit a trivial one like this)

@aheejin aheejin merged commit 9bf582f into llvm:main Feb 18, 2025
13 of 15 checks passed
wldfngrs pushed a commit to wldfngrs/llvm-project that referenced this pull request Feb 19, 2025
The docs conflate `__funcref` with an actual type in a couple places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:WebAssembly clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants